Skip to content

net/http: add QUERY HTTP method - #3

Merged
Icelain merged 1 commit into
masterfrom
net-http-method-query
Jun 24, 2026
Merged

net/http: add QUERY HTTP method#3
Icelain merged 1 commit into
masterfrom
net-http-method-query

Conversation

@Icelain

@Icelain Icelain commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds http.MethodQuery = \"QUERY\" per RFC 10008.
  • Complements existing method constants (MethodGet, MethodPatch, …) so callers can use the standard method string without hard-coding.

Source / readiness

  • Upstream candidate: golang/go#80134 (Gerrit CL 793720)
  • Status on upstream at port time: open, non-draft, mergeable, checks green (0 failing rollup checks)
  • Scope: +1 / −0, single file — low risk, valid standardized feature (not a speculative API)

Why this one (scan results)

Your fork had no open PRs. Upstream GitHub PRs were scanned for ready, non-draft, mergeable feature-sized changes. Other candidates were deferred because they were still in active review (e.g. Landlock/golang#77630), were large/runtime-invasive (stack caching/golang#80137), or were bugfixes rather than features. QUERY is the smallest clear feature addition that is RFC-backed and mechanically trivial.

Usage

req, err := http.NewRequest(http.MethodQuery, url, body)
// ...

Test plan

  • Applies cleanly on fork master (post go1.27 RC + arenas baseline)
  • Diff matches upstream PR intent exactly
  • Optional: go test net/http after local toolchain bootstrap

Add MethodQuery constant for the QUERY method defined in RFC 10008.
Mirrors the style of other method constants (e.g. MethodPatch / RFC 5789).

Ported from golang#80134 (CL 793720).
@Icelain
Icelain merged commit 4e861b6 into master Jun 24, 2026
@Icelain
Icelain deleted the net-http-method-query branch June 24, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant